﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/manager.master" AutoEventWireup="true"
    CodeBehind="train_edit.aspx.cs" Inherits="RailwayReservationWeb.manager.train_edit" %>

<asp:Content ID="Content2" ContentPlaceHolderID="PathContent" runat="server">
    <ol class="breadcrumb">
        <li><a href="default.aspx">Home</a></li>
        <li><a href="train_list.aspx">Train</a></li>
        <li class="active"><a href="train_edit.aspx">Update</a></li>
    </ol>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="page-header">
        <h1>
            Update Train</h1>
    </div>
    <p id="pMessage" runat="server" class="alert alert-danger">
    </p>
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" CssClass="alert alert-danger"
        DisplayMode="List" />
    <div class="form-horizontal">
        <div class="form-group">
            <div class="col-md-3">
                <asp:Label ID="Label1" runat="server" Text="Train No" AssociatedControlID="txtTrainNo"
                    CssClass="control-label"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please input Train No"
                    ForeColor="Red" ControlToValidate="txtTrainNo">∗</asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtTrainNo"
                    ErrorMessage="Tran No must be numeric and between 1 and 8 characters" ForeColor="White"
                    ValidationExpression="^[0-9]{1,8}$">&lt;</asp:RegularExpressionValidator>
            </div>
            <div class="col-md-9">
                <asp:TextBox ID="txtTrainNo" runat="server" TextMode="SingleLine" CssClass="form-control"></asp:TextBox>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-3">
                <asp:Label ID="Label2" runat="server" Text="Train Name" AssociatedControlID="txtTrainName"
                    CssClass="control-label"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Please input Train Name"
                    ForeColor="Red" ControlToValidate="txtTrainName">∗</asp:RequiredFieldValidator>
            </div>
            <div class="col-md-9">
                <asp:TextBox ID="txtTrainName" runat="server" TextMode="SingleLine" CssClass="form-control"></asp:TextBox>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-3">
                <asp:Label ID="Label3" runat="server" Text="Train Type" AssociatedControlID="cboTrainType"
                    CssClass="control-label"></asp:Label>
            </div>
            <div class="col-md-9">
                <asp:DropDownList ID="cboTrainType" runat="server" CssClass="form-control">
                </asp:DropDownList>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-3">
                <asp:Label ID="Label4" runat="server" Text="1AC" AssociatedControlID="txt1AC" CssClass="control-label"></asp:Label>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txt1AC"
                    ErrorMessage="Compartment of 1AC must be numeric and not exceed 1000" ForeColor="White"
                    ValidationExpression="^[0-9]{1,3}$">&lt;</asp:RegularExpressionValidator>
            </div>
            <div class="col-md-9">
                <asp:TextBox ID="txt1AC" runat="server" TextMode="SingleLine" CssClass="form-control"></asp:TextBox>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-3">
                <asp:Label ID="Label5" runat="server" Text="2AC" AssociatedControlID="txt2AC" CssClass="control-label"></asp:Label>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txt2AC"
                    ErrorMessage="Compartment of 2AC must be numeric and not exceed 1000" ForeColor="White"
                    ValidationExpression="^[0-9]{1,3}$">&lt;</asp:RegularExpressionValidator>
            </div>
            <div class="col-md-9">
                <asp:TextBox ID="txt2AC" runat="server" TextMode="SingleLine" CssClass="form-control"></asp:TextBox>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-3">
                <asp:Label ID="Label6" runat="server" Text="3AC" AssociatedControlID="txt3AC" CssClass="control-label"></asp:Label>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txt3AC"
                    ErrorMessage="Compartment of 3AC must be numeric and not exceed 1000" ForeColor="White"
                    ValidationExpression="^[0-9]{1,3}$">&lt;</asp:RegularExpressionValidator>
            </div>
            <div class="col-md-9">
                <asp:TextBox ID="txt3AC" runat="server" TextMode="SingleLine" CssClass="form-control"></asp:TextBox>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-3">
                <asp:Label ID="Label7" runat="server" Text="Sleeper" AssociatedControlID="txt3AC"
                    CssClass="control-label"></asp:Label>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="txtSleeper"
                    ErrorMessage="Compartment of Sleeper must be numeric and not exceed 1000" ForeColor="White"
                    ValidationExpression="^[0-9]{1,3}$">&lt;</asp:RegularExpressionValidator>
            </div>
            <div class="col-md-9">
                <asp:TextBox ID="txtSleeper" runat="server" TextMode="SingleLine" CssClass="form-control"></asp:TextBox>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-3">
                <asp:Label ID="Label8" runat="server" Text="General" AssociatedControlID="txt3AC"
                    CssClass="control-label"></asp:Label>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ControlToValidate="txtGeneral"
                    ErrorMessage="Compartment of 3AC must be numeric and not exceed 1000" ForeColor="White"
                    ValidationExpression="^[0-9]{1,3}$">&lt;</asp:RegularExpressionValidator>
            </div>
            <div class="col-md-9">
                <asp:TextBox ID="txtGeneral" runat="server" TextMode="SingleLine" CssClass="form-control"></asp:TextBox>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-offset-3 col-md-9">
                <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click"
                    CssClass="btn btn-primary" />
                &nbsp;<asp:Button ID="Button1" runat="server" Text="Cancel" CausesValidation="False"
                    PostBackUrl="~/manager/train_list.aspx" CssClass="btn btn-default" UseSubmitBehavior="False" />
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="SideContent" runat="server">
    <div class="panel panel-primary panel-navi">
        <!-- Default panel contents -->
        <div class="panel-heading">
            Manage Trains</div>
        <!-- List group -->
        <ul class="list-group">
            <li class="list-group-item"><a href="train_list.aspx">View Trains List</a></li>
            <li class="list-group-item"><a href="train_add.aspx">Add New Train</a></li>
        </ul>
    </div>
</asp:Content>
